load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "vfs",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "lib": {"name": "vfs"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-vfs",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    crate_root = "src/lib.rs",
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:libc",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:libc",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:tempfile",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:crossbeam",
        "fbsource//third-party/rust:dashmap",
        "fbsource//third-party/rust:fs-err",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "//eden/scm/lib/blob:blob",
        "//eden/scm/lib/fsinfo:fsinfo",
        "//eden/scm/lib/identity:identity",
        "//eden/scm/lib/minibytes:minibytes",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/util:util",
    ],
)
